<?php

namespace plugin\piecing\app\admin\validate;

use think\Validate;

class PiecingActivityValidate extends Validate
{
    protected $rule = [
        'name|商品标题' => 'require|max:150',
        'desc|拼团活动简介' => 'require|max:200',
        'activity_time|活动日期' => 'require',
        'pintuan_time|拼团有效期' => 'require',
        'pintuan_num|参团人数' => 'require|number',
        'total_buy_num|购买总数限制' => 'require|number',
        'once_buy_num|单次购买限制' => 'require|number',
        'is_open|活动状态' => 'require|number|in:1,2'
    ];
}